//-------------Sonic CD R2 1 D Ani Tiles Script---------------//
//-------------------Scripted by LanceReborn------------------//

// Priority
#alias 1	:	PRIORITY_ACTIVE

// ========================
// Main Subs
// ========================

sub ObjectMain
	Object.AnimationTimer++
	if Object.AnimationTimer == 10
		Object.AnimationTimer = 0
		
		Object.Frame += 2
		Object.Frame %= 8

		TempValue0 = 676
		TempValue0 += Object.Frame
		Copy16x16Tile(675, Tempvalue0)

		TempValue0++
		Copy16x16Tile(674, Tempvalue0)
	end if
end sub

sub ObjectStartup
	Object[18].Type = TypeName[Block Animation]
	Object[18].Priority = PRIORITY_ACTIVE
end sub

// ========================
// Editor Subs
// ========================

sub RSDKDraw
	DrawSprite(0)
end sub


sub RSDKLoad
	LoadSpriteSheet("Global/Display.gif")
	SpriteFrame(-16, -16, 32, 32, 1, 143)		// #0 - "Script" Icon

	SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
end sub